//
//  ADRLapidantModel.m
//  Uang Pasti
//
//  Created by 李永彬 on 2025/8/25.
//

#import "ADRLapidantModel.h"
#import "MJExtension.h"

@implementation ADRLapidantModel

+ (BOOL)supportsSecureCoding {
    return YES;
}

- (void)encodeWithCoder:(NSCoder *)encoder {
    [encoder encodeObject:self.circumibility forKey:@"circumibility"];
}

- (instancetype)initWithCoder:(NSCoder *)decoder {
    self = [super init];
    if (self) {
        _circumibility = [decoder decodeObjectOfClasses:[NSSet setWithObjects:[NSArray class], [ADRCircumibilityModel class], nil] forKey:@"circumibility"];
    }
    return self;
}

+ (NSDictionary *)mj_objectClassInArray {
    return @{@"circumibility": [ADRCircumibilityModel class]};
}

@end

@implementation ADRCircumibilityModel

+ (BOOL)supportsSecureCoding {
    return YES;
}

- (void)encodeWithCoder:(NSCoder *)encoder {
    [encoder encodeInteger:self.degreeaneous forKey:@"degreeaneous"];
    [encoder encodeObject:self.lotfication forKey:@"lotfication"];
    [encoder encodeObject:self.quindecimlocalety forKey:@"quindecimlocalety"];
    [encoder encodeObject:self.kinemtreatmentie forKey:@"kinemtreatmentie"];
    [encoder encodeObject:self.botanwise forKey:@"botanwise"];
}

- (instancetype)initWithCoder:(NSCoder *)decoder {
    self = [super init];
    if (self) {
        _degreeaneous = [decoder decodeIntegerForKey:@"degreeaneous"];
        _lotfication = [decoder decodeObjectOfClass:[NSString class] forKey:@"lotfication"];
        _quindecimlocalety = [decoder decodeObjectOfClass:[NSString class] forKey:@"quindecimlocalety"];
        _kinemtreatmentie = [decoder decodeObjectForKey:@"kinemtreatmentie"];
        _botanwise = [decoder decodeObjectOfClasses:[NSSet setWithObjects:[NSArray class], [ADRBotanwiseModel class], nil] forKey:@"botanwise"];
    }
    return self;
}

+ (NSDictionary *)mj_objectClassInArray {
    return @{@"botanwise": [ADRBotanwiseModel class]};
}

@end

@implementation ADRBotanwiseModel

+ (BOOL)supportsSecureCoding {
    return YES;
}

- (void)encodeWithCoder:(NSCoder *)encoder {
    [encoder encodeInteger:self.degreeaneous forKey:@"degreeaneous"];
    [encoder encodeObject:self.lotfication forKey:@"lotfication"];
    [encoder encodeObject:self.quindecimlocalety forKey:@"quindecimlocalety"];
    [encoder encodeObject:self.spendatic forKey:@"spendatic"];
    [encoder encodeObject:self.ternaster forKey:@"ternaster"];
    [encoder encodeObject:self.botanwise forKey:@"botanwise"];
    [encoder encodeObject:self.centesim forKey:@"centesim"];
}

- (instancetype)initWithCoder:(NSCoder *)decoder {
    self = [super init];
    if (self) {
        _degreeaneous = [decoder decodeIntegerForKey:@"degreeaneous"];
        _lotfication = [decoder decodeObjectOfClass:[NSString class] forKey:@"lotfication"];
        _quindecimlocalety = [decoder decodeObjectOfClass:[NSString class] forKey:@"quindecimlocalety"];
        _spendatic = [decoder decodeObjectOfClass:[NSString class] forKey:@"spendatic"];
        _ternaster = [decoder decodeObjectForKey:@"ternaster"];
        _botanwise = [decoder decodeObjectOfClasses:[NSSet setWithObjects:[NSArray class], [ADRBotanwiseSubModel class], nil] forKey:@"botanwise"];
        _centesim = [decoder decodeObjectOfClass:[NSString class] forKey:@"centesim"];
    }
    return self;
}

+ (NSDictionary *)mj_objectClassInArray {
    return @{@"botanwise": [ADRBotanwiseSubModel class]};
}

@end

@implementation ADRBotanwiseSubModel

+ (BOOL)supportsSecureCoding {
    return YES;
}

- (void)encodeWithCoder:(NSCoder *)encoder {
    [encoder encodeInteger:self.degreeaneous forKey:@"degreeaneous"];
    [encoder encodeObject:self.lotfication forKey:@"lotfication"];
    [encoder encodeObject:self.quindecimlocalety forKey:@"quindecimlocalety"];
    [encoder encodeObject:self.centesim forKey:@"centesim"];
}

- (instancetype)initWithCoder:(NSCoder *)decoder {
    self = [super init];
    if (self) {
        _degreeaneous = [decoder decodeIntegerForKey:@"degreeaneous"];
        _lotfication = [decoder decodeObjectOfClass:[NSString class] forKey:@"lotfication"];
        _quindecimlocalety = [decoder decodeObjectOfClass:[NSString class] forKey:@"quindecimlocalety"];
        _centesim = [decoder decodeObjectOfClass:[NSString class] forKey:@"centesim"];
    }
    return self;
}

+ (NSDictionary *)mj_objectClassInArray {
    return @{};
}

@end
